using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Bxas.Core;
using System.Xml.Serialization;
using DigitalAmele.BLL.Abstracts;
using DigitalAmele.BLL.Adapters;
using DigitalAmele.BLL.Core;

namespace DigitalAmele.BLL.Adapters
{
    [XmlType(Namespace = "urn:DataObjects")]
    [XmlRoot(Namespace = "urn:DataObjects")]
    [Serializable]
    public class ProjectErrors : ColumnInfo
    {
        public ProjectErrors()
        {
            this.priymatyKeyColumnName = "Id";
            this.priymatyKeyColumnType = typeof(System.Guid);
            this.TableName = "ProjectErrors";
        }

        #region Fields
		private Guid id = System.Guid.Empty;
		private string message = string.Empty;
		private string errorCode = string.Empty;
		private string cls = string.Empty;
		private string func = string.Empty;
		private DateTime errorDate = new DateTime();

        #endregion
        
        #region Properties
 
		///<summary>
		///Required = true
		///DBType = uniqueidentifier
		///C# Type = Guid
		///</summary> 
		[ColumnAttributes("Id",true,"Guid")]
		public Guid Id
		{
			 get 
			 {
			    return id;
			 }
			 set 
			 { 
			    if (value != id)
			    { 
			      id = value; 
			      IsUpdateOrInsert.Add(ProjectErrors.ColumnNames.Id, true); 
			      this.IsDirty = true; 
			    }
			 }
		}
 
		///<summary>
		///Required = true
		///DBType = ntext
		///C# Type = string
		///</summary> 
		[ColumnAttributes("Message",true,"string")]
		public string Message
		{
			 get 
			 {
			    return message;
			 }
			 set 
			 { 
			    string valueTrimmed = value.Trim(); 

			    if (valueTrimmed != message)
			    { 
			      message = valueTrimmed; 
			      IsUpdateOrInsert.Add(ProjectErrors.ColumnNames.Message, true); 
			      this.IsDirty = true; 
			    }
			 }
		}
 
		///<summary>
		///Required = false
		///DBType = nvarchar
		///C# Type = string
		///</summary> 
		[ColumnAttributes("ErrorCode",false,"string")]
		public string ErrorCode
		{
			 get 
			 {
			    return errorCode;
			 }
			 set 
			 { 
			    string valueTrimmed = value.Trim(); 

			    if (valueTrimmed != errorCode)
			    { 
			      errorCode = valueTrimmed; 
			      IsUpdateOrInsert.Add(ProjectErrors.ColumnNames.ErrorCode, true); 
			      this.IsDirty = true; 
			    }
			 }
		}
 
		///<summary>
		///Required = false
		///DBType = nvarchar
		///C# Type = string
		///</summary> 
		[ColumnAttributes("Cls",false,"string")]
		public string Cls
		{
			 get 
			 {
			    return cls;
			 }
			 set 
			 { 
			    string valueTrimmed = value.Trim(); 

			    if (valueTrimmed != cls)
			    { 
			      cls = valueTrimmed; 
			      IsUpdateOrInsert.Add(ProjectErrors.ColumnNames.Cls, true); 
			      this.IsDirty = true; 
			    }
			 }
		}
 
		///<summary>
		///Required = false
		///DBType = nvarchar
		///C# Type = string
		///</summary> 
		[ColumnAttributes("Func",false,"string")]
		public string Func
		{
			 get 
			 {
			    return func;
			 }
			 set 
			 { 
			    string valueTrimmed = value.Trim(); 

			    if (valueTrimmed != func)
			    { 
			      func = valueTrimmed; 
			      IsUpdateOrInsert.Add(ProjectErrors.ColumnNames.Func, true); 
			      this.IsDirty = true; 
			    }
			 }
		}
 
		///<summary>
		///Required = true
		///DBType = datetime
		///C# Type = DateTime
		///</summary> 
		[ColumnAttributes("ErrorDate",true,"DateTime")]
		public DateTime ErrorDate
		{
			 get 
			 {
			    return errorDate;
			 }
			 set 
			 { 
			    if (value != errorDate)
			    { 
			      errorDate = value; 
			      IsUpdateOrInsert.Add(ProjectErrors.ColumnNames.ErrorDate, true); 
			      this.IsDirty = true; 
			    }
			 }
		}

        #endregion
		        
        #region StringProperties
 
		///<summary>
		///Required = true
		///DBType = uniqueidentifier
		///C# Type = Guid
		///</summary> 
		public virtual string s_Id
		{
			 get 
			 {
			        return Getuniqueidentifier_s(id);
			 }
			 set 
			 { 
			        Setuniqueidentifier_s(value, ref id);
			        IsUpdateOrInsert.Add(ProjectErrors.ColumnNames.Id, true);
			        this.IsDirty = true;
			 }
		}
 
		///<summary>
		///Required = true
		///DBType = ntext
		///C# Type = string
		///</summary> 
		public virtual string s_Message
		{
			 get 
			 {
			        return Getntext_s(message);
			 }
			 set 
			 { 
			        Setntext_s(value, ref message);
			        IsUpdateOrInsert.Add(ProjectErrors.ColumnNames.Message, true);
			        this.IsDirty = true;
			 }
		}
 
		///<summary>
		///Required = false
		///DBType = nvarchar
		///C# Type = string
		///</summary> 
		public virtual string s_ErrorCode
		{
			 get 
			 {
			        return Getnvarchar_s(errorCode);
			 }
			 set 
			 { 
			        Setnvarchar_s(value, ref errorCode);
			        IsUpdateOrInsert.Add(ProjectErrors.ColumnNames.ErrorCode, true);
			        this.IsDirty = true;
			 }
		}
 
		///<summary>
		///Required = false
		///DBType = nvarchar
		///C# Type = string
		///</summary> 
		public virtual string s_Cls
		{
			 get 
			 {
			        return Getnvarchar_s(cls);
			 }
			 set 
			 { 
			        Setnvarchar_s(value, ref cls);
			        IsUpdateOrInsert.Add(ProjectErrors.ColumnNames.Cls, true);
			        this.IsDirty = true;
			 }
		}
 
		///<summary>
		///Required = false
		///DBType = nvarchar
		///C# Type = string
		///</summary> 
		public virtual string s_Func
		{
			 get 
			 {
			        return Getnvarchar_s(func);
			 }
			 set 
			 { 
			        Setnvarchar_s(value, ref func);
			        IsUpdateOrInsert.Add(ProjectErrors.ColumnNames.Func, true);
			        this.IsDirty = true;
			 }
		}
 
		///<summary>
		///Required = true
		///DBType = datetime
		///C# Type = DateTime
		///</summary> 
		public virtual string s_ErrorDate
		{
			 get 
			 {
			        return Getdatetime_s(errorDate);
			 }
			 set 
			 { 
			        Setdatetime_s(value, ref errorDate);
			        IsUpdateOrInsert.Add(ProjectErrors.ColumnNames.ErrorDate, true);
			        this.IsDirty = true;
			 }
		}

        #endregion

		#region ColumnNames
        public class ColumnNames
        {
		public const string Id = "Id";
		public const string Message = "Message";
		public const string ErrorCode = "ErrorCode";
		public const string Cls = "Cls";
		public const string Func = "Func";
		public const string ErrorDate = "ErrorDate";

        }
        #endregion
    }
}

namespace DigitalAmele.BLL.Abstracts
{
    public class _ProjectErrorsBs : BaseBs
    {
		public Boolean insert(ProjectErrors p) { return this._insert<ProjectErrors>(p); }
        public Boolean update(ProjectErrors p) { return this._update<ProjectErrors>(p); }
        public Boolean delete(ProjectErrors p) { return this._delete<ProjectErrors>(p); }
        public List<ProjectErrors> get(string sql) { return this._get<ProjectErrors>(sql); }
        public List<ProjectErrors> get(System.Data.SqlClient.SqlCommand sqlcommand) { return this._get<ProjectErrors>(sqlcommand); }
		public List<ProjectErrors> get_all(List<string> columnNames) { return this._get_all<ProjectErrors>(columnNames); }
        public List<ProjectErrors> get_all_with_all_columns() { return this._get_all_with_all_columns<ProjectErrors>(); }
		public ProjectErrors get_by_primarykey(System.Guid pk, List<string> columnNames) { return this._get_by_primarykey<ProjectErrors>(pk, columnNames); }
    }
}
